import platformRequest from "@/utils/platformRequest";

export const getCategoryInfo = (name:string='', page:number, pageSize:number) =>
  platformRequest({
    url:`/shopCategory/page?name=${name}&page=${page}&pageSize=${pageSize}`,
    method:'get'
  })

export const deleteCategory = (categoryList:number[]) =>
  platformRequest.delete('/shopCategory?ids='+categoryList.join(','))

export const updateCategory = (params:any) =>
  platformRequest.put('/shopCategory', params)

export const addCategory = (params:any) =>
  platformRequest.post('/shopCategory', params)


